#include<func.h>
typedef struct student
{
    int stu_num;     //学号
    char name[256]; // 姓名
    int grade;       // 成绩
}Student;

// 读取结构体到文件中
int main(int argc,char*argv[])
{
    FILE *fp = fopen(argv[1],"rb");
    Student st1,st2,st3;
    fread(&st1,sizeof(st1),1,fp);
    fread(&st2,sizeof(st2),1,fp);
    fread(&st3,sizeof(st3),1,fp);
    printf("num = %d , name =%s  grade = %d",st1.stu_num,st1.name,st1.grade);
    printf("num = %d , name =%s  grade = %d",st2.stu_num,st2.name,st2.grade);
    printf("num = %d , name =%s  grade = %d",st3.stu_num,st3.name,st3.grade);

    fclose(fp);
}